home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Top 200 Programs
/
Top 200 Programs.iso
/
Bob8
/
THOMPSON
/
LIBERTY
/
PRODUCT
/
LB14W.EXE
/
CONSOLE.BAS
< prev
next >
Wrap
BASIC Source File
|
1996-01-08
|
2KB
|
100 lines
dim screen$(25)
for x = 0 to 24
screen$(x) = " "
next x
curX = 1
curY = 0
open "graph me!" for graphics_fs as #1
print #1, "when characterInput [getChar]"
print #1, "font fixedsys 8 15"
print #1, "color white ; backcolor black"
print #1, "fill black"
print #1, "flush"
print #1, "trapclose [quit]"
[loop]
if time$ <> time$() then time$ = time$() : gosub [switchCursor]
'if TrapClose = "true" then [quit]
print #1, "setfocus"
scan
goto [loop]
[switchCursor]
if curVisible = 0 then curVisible = 1 else curVisible = 0
print #1, "place "; (curX - 1)*8+2; " "; curY*15+12
print #1, "down ; north ; size 2 ; rule xor ; color black ; go 14 ; color white ; rule over"
return
[getChar]
c$ = Inkey$
if len(c$) = 1 then [oneChar]
if c$ = chr$(_VK_RETURN)+chr$(_VK_SHIFT)+chr$(_VK_SHIFT) then [loop]
notice c$
goto [loop]
[oneChar]
if curVisible = 1 then gosub [switchCursor]
useThis$ = c$
if c$ > chr$(31) then [visibleChar]
if c$ = chr$(_VK_RETURN) then [cr]
if c$ = chr$(_VK_BACK) and curX = 1 then [loop]
if c$ = chr$(_VK_BACK) then curX = curX - 1 : useThis$ = " "
[visibleChar]
aLine$ = screen$(curY)
screen$(curY) = left$(aLine$, curX - 1) + useThis$ + mid$(aLine$, curX + 1)
print #1, "place "; (curX - 1) * 8 + 2; " "; 15 * curY + 12
print #1, "|"; useThis$
print #1, "discard"
if c$ = chr$(_VK_BACK) then [loop]
curX = curX + 1
if curX = 81 then [cr]
goto [loop]
[cr]
curX = 1
if curY < 23 then curY = curY + 1 : goto [loop]
if screenId <> 0 then print #1, "delsegment "; screenId
for x = 0 to 23
screen$(x) = screen$(x + 1)
print #1, "place 2 "; 15 * x + 12
print #1, "|"; screen$(x)
next x
print #1, "segment"
input #1, screenId
print #1, "flush"
goto [loop]
[displayAll]
if screenId <> 0 then print #1, "delsegment "; screenId
for x = 0 to 23
print #1, "place 2 "; 15 * x + 12
print #1, "|"; screen$(x)
next x
print #1, "segment"
input #1, screenId
print #1, "flush"
return
[quit]
close #1
end